package flextv.search.event {

import com.adobe.cairngorm.control.CairngormEvent;

import flextv.core.vo.Playlist;
import flextv.search.vo.SearchItem;


public class AddSearchItemEvent extends CairngormEvent {
	
	public static const ADD_SEARCH_ITEM: String = "addSearchItem";
	
	private var _searchItem: SearchItem;
	
	private var _targetPlaylist: Playlist;
	
	public function AddSearchItemEvent(searchItem: SearchItem, targetPlaylist: Playlist) {
		super(ADD_SEARCH_ITEM);
		
		if(searchItem == null) throw new ArgumentError("searchItem == null");
		if(targetPlaylist == null) throw new ArgumentError("targetPlaylist == null");
		
		_searchItem = searchItem;
		_targetPlaylist = targetPlaylist;
		
	}
	
	public function get searchItem(): SearchItem {
		return _searchItem;
	}
	
	public function get targetPlaylist(): Playlist {
		return _targetPlaylist;
	}
	
	public override function toString(): String {
		return "AddSearchItemEvent[searchItem="+searchItem+"]";
	}
	
}
}